<?php

declare(strict_types=1);

namespace app\model\mini;

use app\model\admin\Product;
use app\model\AdminBaseModel;
use app\model\member\MpConfig;

/**
 * @mixin \think\Model
 */
class Address extends MiniBaseModel
{
    //
    // 数据表名称
    protected $table = 'user_address';
    protected $scopeField = true;

    //可搜索字段
    protected $searchField = [];
    protected $singleSearchField = [];
    //可作为条件的字段
    protected $whereField = ['user_id'];
    //可做为时间范围查询的字段
    protected $timeField = ['created_at'];
    //不允许删除的ID
    public $noDeletionId = [];
    public function user()
    {
        return $this->belongsTo(MiniUser::class, 'user_id', 'id');
    }
}
